import cn.luckywh.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author W.
 * @date 2020/12/9 15:02
 */
public class MyTestBean3 {
    @Test
    public void test(){
        ApplicationContext context = new ClassPathXmlApplicationContext("MyTestBean3.xml");
        UserService userService = (UserService) context.getBean("userService");
        userService.add();
    }
}